home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / nm.z / nm
Encoding:
Text File  |  2002-10-03  |  10.0 KB  |  277 lines

  1. NM(1)                                                  Last changed: 1-4-99
  2.  
  3.  
  4. NNAAMMEE
  5.      nnmm - Print name list of object file(s)
  6.  
  7. SSYYNNOOPPSSIISS
  8.      nnmm [--bbddeeffgghhllnnoopprruuvvxxAABBCCTTVV] [_f_i_l_e_s]]
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      IRIX systems
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The nnmm command prints formatted listings of the symbol tables for each
  15.      ELF _f_i_l_e specified.  A _f_i_l_e can be a relocatable or absolute ELF
  16.      object file, or it can be an archive.
  17.  
  18.      nnmm produces different output formats depending on options and the
  19.      binary ABI.  The differences are an attempt to preserve the operation
  20.      of scripts that depend on nnmm.  Anyone desiring consistent operation
  21.      across different ABIs should use XPG4 format or Berkeley format.
  22.  
  23.      For old 32-bit-ABI objects the output format by default is the same as
  24.      IRIX5.2 and 5.3 (something like AT&T System V Release 3 format).
  25.  
  26.      For new 32-bit-ABI objects the output format by is AT&T System V
  27.      Release 4 format.
  28.  
  29.      For 64-bit objects the output format is by default in AT&T System V
  30.      Release 4 format.
  31.  
  32.      If the __XXPPGG environment variable is defined, nnmm operates in
  33.      conformance with the X/Open XPG4 specifications (called XXPPGG44 mmooddee in
  34.      this document).  The XPG4 mode format follows the XPG4 standards.  In
  35.      XPG4 mode, nnmm output looks somewhat like nnmm --BB (Berkeley style)
  36.      output.
  37.  
  38.      When Using AT&T System V Release 4 format, the following information
  39.      will be printed for each symbol (an alternative, Berkeley (4.3BSD)
  40.      format, is described later in this man page):
  41.  
  42.      IInnddeexx   The index of the symbol. (The index appears in brackets.)
  43.  
  44.      VVaalluuee   The value of the symbol is one of the following: a section
  45.              offset for defined symbols in a relocatable file; alignment
  46.              constraints for symbols whose section index is SSHHNN__CCOOMMMMOONN; a
  47.              virtual address in executable and dynamic library files.
  48.  
  49.      SSiizzee    The size in bytes of the associated object.
  50.  
  51.      TTyyppee    A symbol is one of the following types:
  52.  
  53.              NNOOTTYYPPEE
  54.                   No type was specified.
  55.  
  56.              OOBBJJEECCTT
  57.                   A data object such as an array or variable.
  58.  
  59.              FFUUNNCC A function or other executable code.
  60.  
  61.              SSEECCTTIIOONN
  62.                   A section symbol
  63.  
  64.              FFIILLEE Name of the source file.
  65.  
  66.      BBiinndd    The symbol's binding attributes.  LLOOCCAALL symbols have a scope
  67.              limited to the object file containing their definition; GGLLOOBBAALL
  68.              symbols are visible to all object files being combined; and
  69.              WWEEAAKK symbols are essentially global symbols with a lower
  70.              precedence than GGLLOOBBAALL.
  71.  
  72.      OOtthheerr   A name scope indicator for (rrlldd()).  One of DDEEFFAAUULLTT, IINNTTEERRNNAALL,
  73.              HHIIDDDDEENN, PPRROOTTEECCTTEEDD.  (see SSTTOO__DDEEFFAAUULLTT, etc in <<ssyyss//eellff..hh>>).
  74.  
  75.      SShhnnddxx   Except for 3 special values, this is the section header table
  76.              index in relation to which the symbol is defined.  The
  77.              following special values exist:  AABBSS indicates the symbol's
  78.              value will not change through relocation; CCOOMMMMOONN indicates an
  79.              unallocated block and the value provides alignment
  80.              constraints; and UUNNDDEEFF indicates an undefined symbol.
  81.  
  82.      NNaammee    The name of the symbol.
  83.  
  84.      The nnmm command supports the options listed below.  NNOOTTEE:  The meaning
  85.      of --oo depends on whether --AA(AT&T) or --BB is in effect when --oo is
  86.      encountered (the meaning depends on the relative ordering of the
  87.      options).
  88.           Examples:
  89.  
  90.                nm -Bo a.out
  91.                nm -oB a.out
  92.  
  93.           In the first example, oo is given the --BB meaning, while in the
  94.           second, it is given the --AA (default) meaning.
  95.  
  96.      --AA      Use AT&T System V Release 4 format output.  This is the
  97.              default for new 32-bit ABI objects and 64bit ABI objects.  In
  98.              XPG4 mode, --AA means write the full pathname of an object on
  99.              each line.
  100.  
  101.      --BB      Use Berkeley (4.3BSD) format output.  Overrides XPG4 mode.
  102.  
  103.      --bb      Print the value field in octal.
  104.  
  105.      --CC      Print decoded C++ names.
  106.  
  107.      --dd      Print the value field in decimal.  This is the default value
  108.              field radix for --AA.
  109.  
  110.      --ee      Print externals and statics only.  This option applies to 32-
  111.              bit objects only and is ignored for 64-bit objects.
  112.  
  113.      --ff      Produce full output.  (This option is obsolete and does
  114.              nothing and will be removed in a future release).
  115.  
  116.      --gg      Print only globally-visible names.
  117.  
  118.      --hh      Do not print headers.
  119.  
  120.      --ll      Adds to the type field displayed in --pp format by printing a
  121.              '*' for weak names.  Has no effect on other formats or on --BB
  122.              format.
  123.  
  124.      --nn      When used alone or with --AA, sort symbols by name.  By name is
  125.              the default sort order for --BB.
  126.  
  127.              When used with --BB, sort all symbols by value.
  128.  
  129.      --oo      When used alone or with --AA, print the value field in octal.
  130.  
  131.              When used with --BB, prepend the filename to output line.  This
  132.              is useful for using ggrreepp to search through nnmm libraries.
  133.  
  134.      --pp      Produce easily parsable, terse output.
  135.  
  136.      --rr      Prepend the name of the object file or archive to each output
  137.              line (Berkeley or XPG style) or name (ATT or default style).
  138.  
  139.      --uu      Print only undefined symbols.
  140.  
  141.      --vv      Sort symbols by value.
  142.  
  143.      --xx      Print value field in hexadecimal.  This is the default value
  144.              field radix for --BB.
  145.  
  146.      --TT      Only applies to the 32-bit output format.  Truncate long
  147.              names, inserting a `*' as the last printed character.  (Since
  148.              symbol names have been moved to the last column, the problem
  149.              of overflow is removed and this option is no longer
  150.              necessary.)
  151.  
  152.      --VV      Print version information on standard error.
  153.  
  154.      --PP      In XPG4 mode, write information in a portable output format
  155.              according to the XPG standard.
  156.  
  157.      --tt ffoorrmmaatt
  158.              In XPG4 mode, write each numeric value in the specified
  159.              format.  The format should be one of the following:
  160.  
  161.              dd   The offset will be written in decimal.
  162.  
  163.              oo   The offset will be written in octal.
  164.  
  165.              xx   The offset will be written in hexadecimal.
  166.  
  167. NNMM --BB FFOORRMMAATT
  168.      For 32-bit objects, nnmm --BB produces Berkeley output format with aaddddrreessss
  169.      or vvaalluuee field followed by a lleetttteerr showing what section the symbol is
  170.      in and the nnaammee of the symbol.  Followed, if the symbol is a weak
  171.      symbol, by ((wweeaakk)).
  172.  
  173.      The following section letters describe the information that nnmm
  174.      generates:
  175.  
  176.           TT   External text.
  177.  
  178.           tt   Local text.
  179.  
  180.           DD   External initialized data.
  181.  
  182.           dd   Local initialized data.
  183.  
  184.           BB   External zeroed data.
  185.  
  186.           bb   Local zeroed data.
  187.  
  188.           AA   External absolute.
  189.  
  190.           aa   Local absolute.
  191.  
  192.           UU   External undefined.
  193.  
  194.           GG   External small initialized data.
  195.  
  196.           gg   Local small initialized data.
  197.  
  198.           II   Init section (IRIX4 static shared library initialization
  199.               code).
  200.  
  201.           SS   External small zeroed data.
  202.  
  203.           ss   Local small zeroed data.
  204.  
  205.           RR   External read only.
  206.  
  207.           rr   Local read only.
  208.  
  209.           CC   Common.
  210.  
  211.           EE   Small common.
  212.  
  213.      The following section letters were frequently emitted by nnmm in earlier
  214.      releases but are now rarely emitted.
  215.  
  216.           NN   Nil storage class, compiler internal usage.
  217.  
  218.           VV   External small undefined.
  219.  
  220.           bb   Fortran based variable
  221.  
  222.           XX   Exception data
  223.  
  224.           PP   Procedure section (not a normal variable).
  225.  
  226.           FF   Fini section.
  227.  
  228.           oo   Non-GP data item (item not put in a small data area even
  229.               though it may be small enough to fit).
  230.  
  231. XXPPGG44 mmooddee
  232.      In XPG4 mode the format is specified by the XPG4 standard.  The output
  233.      is sorted alphabetically by symbol name.  The following information is
  234.      output:
  235.  
  236.           Object  or library name, if -A is specified
  237.  
  238.           Name    Symbol name
  239.  
  240.           Type    Symbol type, which will be one of the following single
  241.                   characters (or one of the Berkeley format letters where
  242.                   non-conflicting with the following list).
  243.  
  244.                   A    Global absolute symbol
  245.  
  246.                   a    Local absolute symbol
  247.  
  248.                   B    External zeroed data
  249.  
  250.                   b    Local zeroed data
  251.  
  252.                   D    Global data symbol
  253.  
  254.                   d    Local data symbol
  255.  
  256.                   T    Global text symbol
  257.  
  258.                   t    Local text symbol
  259.  
  260.                   U    Undefined symbol
  261.  
  262.           Value   The value of the symbol.
  263.  
  264.           Size    The size of the symbol (0 if size not available).
  265.  
  266. NNOOTTEESS
  267.      In some previous releases, the behavior of --rrBB was very different from
  268.      --BBrr (in this case the rr did nothing).  This did not appear to be
  269.      intentional and was certainly undocumented.  Now they both do the same
  270.      thing.
  271.  
  272. SSEEEE AALLSSOO
  273.      ccoolllliiddee(1), eellffdduummpp(1), ddwwaarrffdduummpp(1), ssttdduummpp(1), oodduummpp(1), nnlliisstt(3e)
  274.  
  275.      This man page is available only online.
  276.  
  277.